package in.iqing.module.content;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

/**
 * Created by neavo on 2015/1/7.
 */

public class PageContainerExecutor {

	private Executor executor;
	private static PageContainerExecutor singleton;

	public PageContainerExecutor() {
		this.executor = Executors.newFixedThreadPool(1);
	}

	public static synchronized PageContainerExecutor getSingleton() {
		if (singleton == null) {
			singleton = new PageContainerExecutor();
		}

		return singleton;
	}

	public void execute(Runnable runnable) {
		executor.execute(runnable);
	}
}
